package com.thread.thread;

public class Thread1 extends Thread{

    @Override
    public void run() {
        String name = Thread.currentThread().getName();
        System.out.println(name);
    }

    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            Thread1 thread1 = new Thread1();
            thread1.start();
        }
    }

    //缺陷：通过 extends 只能继承一个类，不灵活
}
